<template>
	<div id="task"></div>
</template>

<script>
import Vue from 'vue'
import VueResource from 'vue-resource'
Vue.use(VueResource)

export default {
	components: {
	},
	data () {
	  	return{
	  	}
	},
	methods:{  	
	},
	mounted (){
        var token = localStorage.getItem("token")
        var eid = localStorage.getItem("eid")
        //var openid = localStorage.getItem("openid")
        var obj = {token:token,eid:eid}
        if(token && eid){
            this.$http.post('/api/v1/coin/verify_token_by_time/',obj)
            .then(function(res){
                console.log(res.data)
                if(res.data.code == '-1' || res.data.code == '-2'){
                    this.$router.push('/error')
                }else{
                    this.$router.push({path: '/',query:{code:res.data.code}})
//                    window.location.href = 'http://www.nowdone.com.cn/?code='+res.data.code
                }
            })
        }
	}
}
</script>

<style lang="less"></style>